package com.zhentao.mapper;

import com.zhentao.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
* @author lenovo
* @description 针对表【user(用户基础信息表)】的数据库操作Mapper
* @createDate 2025-09-22 15:25:03
* @Entity com.zhentao.pojo.User
*/
@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 根据 openid 查询用户是否存在
    @Select("select user_id from user where wx_open_id = #{openId}")
    Long getUserByOpenId(String openId);
}




